package com.lzh.mybatisdemo.enums;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @Author lzh
 * @description 是否类型枚举
 * @Date 2022/3/28 16:33
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum YesOrNoEnum implements BaseEnum {
    YES(1, "是"),
    NO(2, "否");

    private Integer value;
    private String text;

    YesOrNoEnum(Integer value, String text) {
        this.value = value;
        this.text = text;
    }
    @Override
    public Object getValue() {
        return this.value;
    }

    @Override
    public String getText() {
        return this.text;
    }

    @Override
    public String getName() {
        return this.name();
    }
}
